package com.xuhao.examai.exam.application.services;

import com.xuhao.examai.model.entity.Exam;
import com.xuhao.examai.model.entity.Question;
import com.xuhao.examai.model.vo.ResultVO;
import java.util.List;

public interface ExamService {
	// 管理端方法
	ResultVO<Exam> createExam(Exam exam);

	ResultVO<Exam> updateExam(Exam exam);

	ResultVO<Void> deleteExam(Long id);

	Exam getExamById(Long id);

	List<Exam> getAllExams();

	List<Exam> getPublishedExams();

	ResultVO<Void> publishExam(Long id);

	ResultVO<Void> cancelExam(Long id);

	// 考试端方法
	Exam getExamById(String examId);

	Long startExam(Long examId);

	List<Question> getExamQuestions(String examId);

	void submitAnswer(Long examRecordId, Long questionId, String answer);

	void submitExam(String examRecordId);

	void saveDraft(String examRecordId);
}
